home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 February / EnigmA AMIGA RUN 04 (1996)(G.R. Edizioni)(IT)[!][issue 1996-02][Skylink CD III].iso / earcd / library / reqtlsdv.lha / ReqTools / Glue / Oberon / oberon_glue.lha / ReqTools.mod < prev    next >
Text File  |  1992-07-26  |  24KB  |  655 lines

  1. (* ------------------------------------------------------------------------
  2.   :Program.       ReqTools
  3.   :Contents.      Interface to Nico François' reqtools.library
  4.   :Author.        Kai Bolay [kai] (C-Version by Nico François)
  5.   :Address.       Hoffmannstraße 168
  6.   :Address.       D-7250 Leonberg 1 (Germany)
  7.   :Address.       UUCP: ...!cbmvax!cbmehq!cbmger!depot1!amokle!kai
  8.   :Address.       FIDO: 2:247/706.3
  9.   :History.       v1.0  [kai]  22-Nov-91 (translated from C)
  10.   :History.       v2.0  [kai]  31-Jan-92 (fixed bug in ReqToolsBase)
  11.   :History.       v2.0n [Nico]  7-Mar-92 (comment added about ta.name bug)
  12.   :History.       v2.0  [kai]  14-May-92 (updated for V38)
  13.   :History.       v2.0n [Nico]  3-Jun-92 (cleanup, added V38 functions)
  14.   :History.       v2.0k [kai]  12-Jun-92 (made compile)
  15.   :Copyright.     Freeware
  16.   :Language.      Oberon
  17.   :Translator.    AMIGA OBERON v2.39d, A+L AG
  18.   :Translator.    In order to compile with older versions of the compiler
  19.   :Translator.    change "UNTRACED POINTER" to "POINTER" and "-" to "*"
  20.   :Remark.        Thanks to Nico for his great library
  21.   :Remark.        Thanks to Christian Stiens for finding a bug
  22.   :Bugs.          ReqTools/Arq should support each other
  23.   :Bugs.          Font-Hook: ta.name can contain odd pointer :-(
  24.   :Bugs.          <odd Pointer is fault of AvailFonts function> - Nico
  25. ------------------------------------------------------------------------ *)
  26.  
  27. (*
  28. **  Filename: reqtools.mod
  29. **  Release: 2.0
  30. **
  31. **  Oberon interface.
  32. **
  33. **  (C) Copyright 1991/1992 Nico François
  34. **  All Rights Reserved
  35. *)
  36.  
  37. MODULE ReqTools;
  38.  
  39. IMPORT
  40.   e: Exec, d: Dos, I: Intuition, g: Graphics, u: Utility;
  41.  
  42. CONST
  43.   ReqToolsName* = "reqtools.library";
  44.   ReqToolsVersion* = 38;
  45.  
  46. TYPE
  47.   ReqToolsBasePtr* = UNTRACED POINTER TO ReqToolsBase;
  48.   ReqToolsBase* = STRUCT (libNode*: e.Library)
  49.     flags-: SHORTSET;
  50.     pad0, pad1, pad2: SHORTINT;
  51.     segList-: e.BPTR;
  52.     (* The following library bases may be read and used by your program *)
  53.     intuitionBase-: I.IntuitionBasePtr;
  54.     gfxBase-: g.GfxBasePtr;
  55.     dosBase-: d.DosLibraryPtr;
  56.     (* Next two library bases are only (and always) valid on Kickstart 2.0!
  57.        (1.3 version of reqtools also initializes these when run on 2.0) *)
  58.     gadToolsBase-: e.LibraryPtr;
  59.     utilityBase-: e.LibraryPtr;
  60.   END;
  61.  
  62. CONST
  63.   (* types of requesters, for AllocRequestA() *)
  64.   TypeFileReq*       = 0;
  65.   TypeReqInfo*       = 1;
  66.   TypeFontReq*       = 2;
  67.   TypeScreenModeReq* = 3;
  68.  
  69. TYPE
  70.   ReqToolsReqPtr * = UNTRACED POINTER TO ReqToolsReq;
  71.   ReqToolsReq * = STRUCT END; (* make them compatible.. *)
  72.  
  73.  
  74. (***********************
  75. *                      *
  76. *    File requester    *
  77. *                      *
  78. ***********************)
  79.  
  80. (* structure _MUST_ be allocated with AllocRequest() *)
  81.  
  82. TYPE
  83.   FileRequesterPtr* = UNTRACED POINTER TO FileRequester;
  84.   FileRequester* = STRUCT (dummy: ReqToolsReq)
  85.     reqPos*: LONGINT;
  86.     leftOffset*: INTEGER;
  87.     topOffset*: INTEGER;
  88.     flags*: LONGSET;
  89.     (* OBSOLETE IN V38! DON'T USE! *) hook*: u.HookPtr;
  90.     dir-: e.STRPTR;              (* READ ONLY! Change with ChangeReqAttrA()! *)
  91.     matchPat-: e.STRPTR;         (* READ ONLY! Change with ChangeReqAttrA()! *)
  92.     defaultFont*: g.TextFontPtr;
  93.     waitPointer*: e.ADDRESS;
  94.     (* V38 *)
  95.     lockWindow*: LONGINT;
  96.     shareIDCMP*: LONGINT;
  97.     intuiMsgFunc*: u.HookPtr;
  98.     reserved1*: INTEGER;
  99.     reserved2*: INTEGER;
  100.     reserved3*: INTEGER;
  101.     reqHeight-: INTEGER;         (* READ ONLY!  Use RTFI_Height tag! *)
  102.     (* Private data follows! HANDS OFF :-) *)
  103.   END;
  104.  
  105. (* returned by FileRequestA() if multiselect is enabled,
  106.    free list with FreeFileList() *)
  107.  
  108.   FileListPtr* = UNTRACED POINTER TO FileList;
  109.   FileList* = STRUCT
  110.     next*: FileListPtr;
  111.     strLen*: LONGINT;  (* -1 for directories *)
  112.     name*: e.STRPTR;
  113.   END;
  114.  
  115. (* structure passed to RTFI_FilterFunc callback hook by
  116.    volume requester (see RTFI_VolumeRequest tag) *)
  117.  
  118.   VolumeEntryPtr* = UNTRACED POINTER TO VolumeEntry;
  119.   VolumeEntry* = STRUCT
  120.     type*: LONGINT;    (* DLT_DEVICE or DLT_DIRECTORY *)
  121.     name*: e.STRPTR;
  122.   END;
  123.  
  124. (***********************
  125. *                      *
  126. *    Font requester    *
  127. *                      *
  128. ***********************)
  129.  
  130. (* structure _MUST_ be allocated with AllocRequest() *)
  131.  
  132.   FontRequesterPtr* = UNTRACED POINTER TO FontRequester;
  133.   FontRequester* = STRUCT (dummy: ReqToolsReq)
  134.     reqPos*: LONGINT;
  135.     leftOffset*: INTEGER;
  136.     topOffset*: INTEGER;
  137.     flags*: LONGSET;
  138.     (* OBSOLETE IN V38! DON'T USE! *) hook*: u.HookPtr;
  139.     attr-: g.TextAttr;           (* READ ONLY! *)
  140.     defaultFont*: g.TextFontPtr;
  141.     waitPointer*: e.ADDRESS;
  142.     (* V38 *)
  143.     lockWindow*: LONGINT;
  144.     shareIDCMP*: LONGINT;
  145.     intuiMsgFunc*: u.HookPtr;
  146.     reserved1*: INTEGER;
  147.     reserved2*: INTEGER;
  148.     reserved3*: INTEGER;
  149.     reqHeight-: INTEGER;         (* READ ONLY!  Use RTFI_Height tag! *)
  150.     (* Private data follows! HANDS OFF :-) *)
  151.   END;
  152.  
  153.  
  154. (*************************
  155. *                        *
  156. *  ScreenMode requester  *
  157. *                        *
  158. *************************)
  159.  
  160. (* structure _MUST_ be allocated with rtAllocRequest() *)
  161.  
  162.   ScreenModeRequesterPtr = UNTRACED POINTER TO ScreenModeRequester;
  163.   ScreenModeRequester = STRUCT (dummy: ReqToolsReq)
  164.     reqPos*: LONGINT;
  165.     leftOffset*: INTEGER;
  166.     topOffset*: INTEGER;
  167.     flags*: LONGSET;
  168.     private1*: LONGINT;
  169.     displayID-: LONGINT;         (* READ ONLY! *)
  170.     displayWidth-: INTEGER;      (* READ ONLY! *)
  171.     displayHeight-: INTEGER;     (* READ ONLY! *)
  172.     defaultFont*: g.TextFontPtr;
  173.     waitPointer*: e.ADDRESS;
  174.     lockWindow*: LONGINT;
  175.     shareIDCMP*: LONGINT;
  176.     intuiMsgFunc*: u.HookPtr;
  177.     reserved1*: INTEGER;
  178.     reserved2*: INTEGER;
  179.     reserved3*: INTEGER;
  180.     reqHeight-: INTEGER;         (* READ ONLY!  Use RTFI_Height tag! *)
  181.     displayDepth*: INTEGER;
  182.     overscanType*: INTEGER;
  183.     autoScroll*: LONGINT;
  184.     (* Private data follows! HANDS OFF :-) *)
  185.   END;
  186.  
  187. (***********************
  188. *                      *
  189. *    Requester Info    *
  190. *                      *
  191. ***********************)
  192.  
  193.   (* for EZRequestA(), GetLongA(), GetStringA() and PaletteRequestA(),
  194.    _MUST_ be allocated with AllocRequest() *)
  195.  
  196.   ReqInfoPtr* = UNTRACED POINTER TO ReqInfo;
  197.   ReqInfo* = STRUCT (dummy: ReqToolsReq)
  198.     reqPos*: LONGINT;
  199.     leftOffset*: INTEGER;
  200.     topOffset*: INTEGER;
  201.     width*: LONGINT;             (* not for EZRequestA() *)
  202.     reqTitle*: e.STRPTR;         (* currently only for EZRequestA() *)
  203.     flags*: LONGSET;
  204.     defaultFont*: g.TextFontPtr; (* currently only for PaletteRequestA() *)
  205.     waitPointer*: e.ADDRESS;
  206.     (* V38 *)
  207.     lockWindow: LONGINT;
  208.     shareIDCMP: LONGINT;
  209.     intuiMsgFunc: u.HookPtr;
  210.     (* structure may be extended in future *)
  211.   END;
  212.  
  213. (***********************
  214. *                      *
  215. *     Handler Info     *
  216. *                      *
  217. ***********************)
  218.  
  219. (* for ReqHandlerA(), will be allocated for you when you use
  220.    the ReqHandler tag, never try to allocate this yourself! *)
  221.  
  222.   HandlerInfoPtr* = UNTRACED POINTER TO HandlerInfo;
  223.   HandlerInfo* = STRUCT
  224.     private1: LONGINT;
  225.     waitMask*: LONGSET;
  226.     doNotWait*: I.LONGBOOL; (* ? *)
  227.     (* Private data follows, HANDS OFF :-) *)
  228.   END;
  229.  
  230. (* possible return codes from ReqHandlerA() *)
  231. CONST
  232.   CallHandler* = 080000000H;
  233.  
  234.  
  235. (*************************************
  236. *                                    *
  237. *                TAGS                *
  238. *                                    *
  239. *************************************)
  240.  
  241.   TagBase* = u.user;
  242.  
  243.   (*** tags understood by most requester functions ***)
  244.   (* optional pointer to window *)
  245.   Window* = TagBase+1;
  246.   (* idcmp flags requester should abort on (useful for IDCMP_DISKINSERTED) *)
  247.   IDCMPFlags* = TagBase+2;
  248.   (* position of requester window (see below) - default REQPOS_POINTER *)
  249.   ReqPos* = TagBase+3;
  250.   (* signal mask to wait for abort signal *)
  251.   LeftOffset* = TagBase+4;
  252.   (* topedge offset of requester relative to position specified by ReqPos *)
  253.   TopOffset* = TagBase+5;
  254.   (* name of public screen to put requester on (Kickstart 2.0 only!) *)
  255.   PubScrName* = TagBase+6;
  256.   (* address of screen to put requester on *)
  257.   Screen* = TagBase+7;
  258.   (* tagdata must hold the address of (!) an APTR variable *)
  259.   DoReqHandler* = TagBase+8;
  260.   (* font to use when screen font is rejected, _MUST_ be fixed-width font!
  261.    (struct TextFont *, not struct TextAttr *!)
  262.    - default GfxBase->DefaultFont *)
  263.   DefaultFont* = TagBase+9;
  264.   (* boolean to set the standard wait pointer in window - default FALSE *)
  265.   WaitPointer* = TagBase+10;
  266.   (* (V38) char preceding keyboard shortcut characters (will be underlined) *)
  267.   Underscore* = TagBase+11;
  268.   (* (V38) share IDCMP port with window - default FALSE *)
  269.   ShareIDCMP* = TagBase+12;
  270.   (* (V38) lock window and set standard wait pointer - default FALSE *)
  271.   LockWindowTag* = TagBase+13;
  272.   (* (V38) boolean to make requester's screen pop to front - default TRUE *)
  273.   ScreenToFront* = TagBase+14;
  274.   (* (V38) Requester should use this font - default: screen font *)
  275.   TextAttr* = TagBase+15;
  276.   (* (V38) call this hook for every IDCMP message not for requester *)
  277.   IntuiMsgFunc* = TagBase+16;
  278.   (* (V38) Locale ReqTools should use for text *)
  279.   Locale* = TagBase+17;
  280.  
  281.   (*** tags specific to EZRequestA ***
  282.   *)
  283.   (* title of requester window - default "Request" or "Information" *)
  284.   ezReqTitle* = TagBase+20;
  285.   (* TagBase+21 reserved *)
  286.   (* various flags (see below) *)
  287.   ezFlags* = TagBase+22;
  288.   (* default response (activated by pressing RETURN) - default TRUE *)
  289.   ezDefaultResponse* = TagBase+23;
  290.  
  291. (*** tags specific to GetLongA ***
  292. *)
  293.   (* minimum allowed value - default MININT *)
  294.   glMin* = TagBase+30;
  295.   (* maximum allowed value - default MAXINT *)
  296.   glMax* = TagBase+31;
  297.   (* suggested width of requester window (in pixels) *)
  298.   glWidth* = TagBase+32;
  299.   (* boolean to show the default value - default TRUE *)
  300.   glShowDefault* = TagBase+33;
  301.   (* (V38) string with possible responses - default " _Ok |_Cancel" *)
  302.   glGadFmt * = TagBase+34;
  303.   (* (V38) optional arguments for RTGL_GadFmt *)
  304.   glGadFmtArgs* = TagBase+35;
  305.   (* (V38) invisible typing - default FALSE *)
  306.   glInvisible* = TagBase+36;
  307.   (* (V38) window backfill - default TRUE *)
  308.   glBackFill* = TagBase+37;
  309.   (* (V38) optional text above gadget *)
  310.   glTextFmt* = TagBase+38;
  311.   (* (V38) optional arguments for RTGS_TextFmt *)
  312.   glTextFmtArgs* = TagBase+39;
  313.   (* (V38) various flags (see below) *)
  314.   glFlags* = ezFlags;
  315.  
  316. (*** tags specfic to GetStringA ***
  317. *)
  318.   (* suggested width of requester window (in pixels) *)
  319.   gsWidth* = glWidth;
  320.   (* allow empty string to be accepted - default FALSE *)
  321.   gsAllowEmpty* = TagBase+80;
  322.   (* (V38) string with possible responses - default " _Ok |_Cancel" *)
  323.   gsGadFmt * = glGadFmt;
  324.   (* (V38) optional arguments for RTGS_GadFmt *)
  325.   gsGadFmtArgs* = glGadFmtArgs;
  326.   (* (V38) invisible typing - default FALSE *)
  327.   gsInvisible* = glInvisible;
  328.   (* (V38) window backfill - default TRUE *)
  329.   gsBackFill* = glBackFill;
  330.   (* (V38) optional text above gadget *)
  331.   gsTextFmt* = glTextFmt;
  332.   (* (V38) optional arguments for RTGS_TextFmt *)
  333.   gsTextFmtArgs* = glTextFmtArgs;
  334.   (* (V38) various flags (see below) *)
  335.   gsFlags* = ezFlags;
  336.  
  337. (*** tags specific to FileRequestA ***
  338. *)
  339.   (* various flags (see below) *)
  340.   fiFlags* = TagBase+40;
  341.   (* suggested height of file requester *)
  342.   fiHeight* = TagBase+41;
  343.   (* replacement text for 'Ok' gadget (max 6 chars) *)
  344.   fiOkText* = TagBase+42;
  345.   (* (V38) bring up volume requester, tag data holds flags (see below) *)
  346.   fiVolumeRequest* = TagBase+43;
  347.   (* (V38) call this hook for every file in the directory *)
  348.   fiFilterFunc* = TagBase+44;
  349.   (* (V38) allow empty file to be accepted - default FALSE *)
  350.   fiAllowEmpty* = TagBase+45;
  351.  
  352. (*** tags specific to FontRequestA ***
  353. *)
  354.   (* various flags (see below) *)
  355.   foflags* = fiFlags;
  356.   (* suggested height of font requester *)
  357.   foHeight* = fiHeight;
  358.   (* replacement text for 'Ok' gadget (max 6 chars) *)
  359.   foOkText* = fiOkText;
  360.   (* suggested height of font sample display - default 24 *)
  361.   foSampleHeight= TagBase+60;
  362.   (* minimum height of font displayed *)
  363.   foMinHeight* = TagBase+61;
  364.   (* maximum height of font displayed *)
  365.   foMaxHeight* = TagBase+62;
  366.   (* [TagBase+63 to TagBase+66 used below] *)
  367.   (* (V38) call this hook for every font *)
  368.   foFilterFunc* = fiFilterFunc;
  369.  
  370.   (*** (V38) tags for rtScreenModeRequestA ***
  371. *)
  372.   (* various flags (see below) *)
  373.   scFlags* = fiFlags;
  374.   (* suggested height of screenmode requester *)
  375.   scHeight* = fiHeight;
  376.   (* replacement text for 'Ok' gadget (max 6 chars) *)
  377.   scOkText* = fiOkText;
  378.   (* property flags (see also RTSC_PropertyMask) *)
  379.   scPropertyFlags* = TagBase+90;
  380.   (* property mask - default all bits in RTSC_PropertyFlags considered *)
  381.   scPropertyMask* = TagBase+91;
  382.   (* minimum display width allowed *)
  383.   scMinWidth* = TagBase+92;
  384.   (* maximum display width allowed *)
  385.   scMaxWidth* = TagBase+93;
  386.   (* minimum display height allowed *)
  387.   scMinHeight* = TagBase+94;
  388.   (* maximum display height allowed *)
  389.   scMaxHeight* = TagBase+95;
  390.   (* minimum display depth allowed *)
  391.   scMinDepth* = TagBase+96;
  392.   (* maximum display depth allowed *)
  393.   scMaxDepth* = TagBase+97;
  394.   (* call this hook for every display mode id *)
  395.   scFilterFunc* = fiFilterFunc;
  396.  
  397. (*** tags for ChangeReqAttrA ***
  398. *)
  399.   (* file requester - set directory *)
  400.   fiDir* = TagBase+50;
  401.   (* file requester - set wildcard pattern *)
  402.   fiMatchPat* = TagBase+51;
  403.   (* file requester - add a file or directory to the buffer *)
  404.   fiAddEntry* = TagBase+52;
  405.   (* file requester - remove a file or directory from the buffer *)
  406.   fiRemoveEntry* = TagBase+53;
  407.   (* font requester - set font name of selected font *)
  408.   foFontName* = TagBase+63;
  409.   (* font requester - set font size *)
  410.   foFontHeight* = TagBase+64;
  411.   (* font requester - set font style *)
  412.   foFontStyle* = TagBase+65;
  413.   (* font requester - set font flags *)
  414.   foFontFlags* = TagBase+66;
  415.   (* (V38) screenmode requester - get display attributes from screen *)
  416.   scModeFromScreen* = TagBase+80;
  417.   (* (V38) screenmode requester - set display mode id (32-bit extended) *)
  418.   scDisplayID* = TagBase+81;
  419.   (* (V38) screenmode requester - set display width *)
  420.   scDisplayWidth* = TagBase+82;
  421.   (* (V38) screenmode requester - set display height *)
  422.   scDisplayHeight* = TagBase+83;
  423.   (* (V38) screenmode requester - set display depth *)
  424.   scDisplayDepth* = TagBase+84;
  425.   (* (V38) screenmode requester - set overscan type, 0 for regular size *)
  426.   scOverscanType* = TagBase+85;
  427.   (* (V38) screenmode requester - set autoscroll *)
  428.   scAutoScroll* = TagBase+86;
  429.  
  430. (*** tags for PaletteRequestA ***
  431. *)
  432.   (* initially selected color - default 1 *)
  433.   paColor* = TagBase+70;
  434.  
  435. (*** tags for ReqHandlerA ***
  436. *)
  437.   (* end requester by software control, set tagdata to REQ_CANCEL, REQ_OK or
  438.    in case of EZRequest to the return value *)
  439.   rhEndRequest* = TagBase+60;
  440.  
  441. (*** tags for AllocRequestA ***)
  442.   (* no tags defined yet *)
  443.  
  444.  
  445. (************
  446. * ReqPos    *
  447. ************)
  448.   ReqPosPointer* = 0;
  449.   ReqPosCenterWin* = 1;
  450.   ReqPosCenterScr* = 2;
  451.   ReqPosTopLeftWin* = 3;
  452.   ReqPosTopLeftScr* = 4;
  453.  
  454. (******************
  455. * RTRH_EndRequest *
  456. ******************)
  457.   ReqCancel* = 0;
  458.   ReqOK* = 1;
  459.  
  460. (***************************************
  461. * flags for RTFI_Flags and RTFO_Flags  *
  462. * or filereq->Flags and fontreq->Flags *
  463. ***************************************)
  464.   fReqNoBuffer* = 2;
  465.  
  466. (*****************************************
  467. * flags for RTFI_Flags or filereq->Flags *
  468. *****************************************)
  469.   fReqMultiSelect* = 0;
  470.   fReqSave* = 1;
  471.   fReqNoFiles* = 3;
  472.   fReqPatGad* = 4;
  473.   fReqSelectDirs* = 12;
  474.  
  475. (*****************************************
  476. * flags for RTFO_Flags or fontreq->Flags *
  477. *****************************************)
  478.   fReqFixedWidth* = 5;
  479.   fReqColorFonts* = 6;
  480.   fReqChangePalette* = 7;
  481.   fReqLeavePalette* = 8;
  482.   fReqScale* = 9;
  483.   fReqStyle* = 10;
  484.  
  485. (*****************************************************
  486. * (V38) flags for RTSC_Flags or screenmodereq->Flags *
  487. *****************************************************)
  488.   scReqSizeGads* = 13;
  489.   scReqDepthGad* = 14;
  490.   scReqNonStdModes* =15;
  491.   scReqGuiModes* = 16;
  492.   scReqAutoscrollGad* =18;
  493.   scReqOverscanGad* =19;
  494.  
  495. (*****************************************
  496. * flags for RTEZ_Flags or reqinfo->Flags *
  497. *****************************************)
  498.   ezReqNoReturnKey* = 0;
  499.   ezReqLamigaQual* = 1;
  500.   ezReqCenterText* = 2;
  501.  
  502. (***********************************************
  503. * (V38) flags for RTGL_Flags or reqinfo->Flags *
  504. ***********************************************)
  505.   glReqCenterText* = ezReqCenterText;
  506.   glReqHighlightText* = 3;
  507.  
  508. (***********************************************
  509. * (V38) flags for RTGS_Flags or reqinfo->Flags *
  510. ***********************************************)
  511.   gsReqCenterText* = ezReqCenterText;
  512.   gsReqHighlightText* = glReqHighlightText;
  513.  
  514. (*****************************************
  515. * (V38) flags for RTFI_VolumeRequest tag *
  516. *****************************************)
  517.   vReqNoAssigns* = 0;
  518.   vReqNoDisks* = 1;
  519.   vReqAllDisks* = 2;
  520.  
  521. (*
  522.    Following things are obsolete in ReqTools V38.
  523.    Don't use them in new code!
  524. *)
  525.   fReqDoWildFunc* = 11;
  526.   ReqHookWildFile* = 0;
  527.   ReqHookWildFont* = 1;
  528.  
  529. VAR
  530.   req*: ReqToolsBasePtr;
  531.  
  532. PROCEDURE AllocRequestA* {req, -30} (type{0}: LONGINT;
  533.                                      tagList{8}: ARRAY OF u.TagItem): ReqToolsReqPtr;
  534. PROCEDURE AllocRequest* {req, -30} (type{0}: LONGINT;
  535.                                     tag1{8}..: u.Tag): ReqToolsReqPtr;
  536. PROCEDURE FreeRequest* {req, -36} (req{9}: ReqToolsReqPtr);
  537. PROCEDURE FreeReqBuffer* {req, -42} (req{9}: ReqToolsReqPtr);
  538. PROCEDURE ChangeReqAttrA* {req, -48} (req{9}: ReqToolsReqPtr;
  539.                                       tagList{8}: ARRAY OF u.TagItem);
  540. PROCEDURE ChangeReqAttr* {req, -48} (req{9}: ReqToolsReqPtr;
  541.                                      tag1{8}..: u.Tag);
  542. PROCEDURE FileRequestA* {req, -54} (fileReq{9}: FileRequesterPtr;
  543.                                     VAR fileName{10}: ARRAY OF CHAR;
  544.                                     title{11}: ARRAY OF CHAR;
  545.                                     tagList{8}: ARRAY OF u.TagItem): BOOLEAN;
  546. PROCEDURE FileRequest* {req, -54} (fileReq{9}: FileRequesterPtr;
  547.                                    VAR fileName{10}: ARRAY OF CHAR;
  548.                                    title{11}: ARRAY OF CHAR;
  549.                                    tag1{8}..: u.Tag): BOOLEAN;
  550. PROCEDURE FreeFileList* {req, -60} (fileList{8}: FileListPtr);
  551. PROCEDURE EZRequestA* {req, -66} (bodyfmt{9}, gadfmt{10}: ARRAY OF CHAR;
  552.                                   reqInfo{11}: ReqInfoPtr;
  553.                                   argarray{12}: e.APTR;
  554.                                   tagList{8}: ARRAY OF u.TagItem): LONGINT;
  555. PROCEDURE EZRequestTags* {req, -66} (bodyfmt{9}, gadfmt{10}: ARRAY OF CHAR;
  556.                                      reqInfo{11}: ReqInfoPtr;
  557.                                      argarray{12}: e.APTR;
  558.                                      tag1{8}..: u.Tag):LONGINT;
  559. PROCEDURE EZRequest* {req, -66} (bodyfmt{9}, gadfmt{10}: ARRAY OF CHAR;
  560.                                  reqInfo{11}: ReqInfoPtr;
  561.                                  tagList{8}: ARRAY OF u.TagItem;
  562.                                  argarray{12}..: e.APTR): LONGINT;
  563. (* Without result.... *)
  564. PROCEDURE vEZRequestA* {req, -66} (bodyfmt{9}, gadfmt{10}: ARRAY OF CHAR;
  565.                                    reqInfo{11}: ReqInfoPtr;
  566.                                    argarray{12}: e.APTR;
  567.                                    tagList{8}: ARRAY OF u.TagItem);
  568. PROCEDURE vEZRequestTags* {req, -66} (bodyfmt{9}, gadfmt{10}: ARRAY OF CHAR;
  569.                                       reqInfo{11}: ReqInfoPtr;
  570.                                       argarray{12}: e.APTR;
  571.                                       tag1{8}..: u.Tag);
  572. PROCEDURE vEZRequest* {req, -66} (bodyfmt{9}, gadfmt{10}: ARRAY OF CHAR;
  573.                                   reqInfo{11}: ReqInfoPtr;
  574.                                   tagList{8}: ARRAY OF u.TagItem;
  575.                                   argarray{12}..: e.APTR);
  576. PROCEDURE GetStringA* {req, -72} (VAR buffer{9}: ARRAY OF CHAR;
  577.                                   maxchars{0}: LONGINT;
  578.                                   title{10}: ARRAY OF CHAR;
  579.                                   reqInfo{11}: ReqInfoPtr;
  580.                                   tagList{8}: ARRAY OF u.TagItem): BOOLEAN;
  581. PROCEDURE GetString* {req, -72} (VAR buffer{9}: ARRAY OF CHAR;
  582.                                  maxchars{0}: LONGINT;
  583.                                  title{10}: ARRAY OF CHAR;
  584.                                  reqInfo{11}: ReqInfoPtr;
  585.                                  tag1{8}..: u.Tag): BOOLEAN;
  586. PROCEDURE GetLongA* {req, -78} (VAR long{9}: LONGINT; title{10}: ARRAY OF CHAR;
  587.                                 reqInfo{11}: ReqInfoPtr;
  588.                                 tagList{8}: ARRAY OF u.TagItem): BOOLEAN;
  589. PROCEDURE GetLong* {req, -78} (VAR long{9}: LONGINT; title{10}: ARRAY OF CHAR;
  590.                                reqInfo{11}: ReqInfoPtr;
  591.                                tag1{8}..: u.Tag): BOOLEAN;
  592. PROCEDURE FontRequestA* {req, -96} (fontReq{9}: FontRequesterPtr;
  593.                                     title{11}: ARRAY OF CHAR;
  594.                                     tagList{8}: ARRAY OF u.TagItem): BOOLEAN;
  595. PROCEDURE FontRequest* {req, -96} (fontReq{9}: FontRequesterPtr;
  596.                                    title{11}: ARRAY OF CHAR;
  597.                                    tag1{8}..: u.Tag):BOOLEAN;
  598. PROCEDURE PaletteRequestA* {req, -102} (title{10}: ARRAY OF CHAR;
  599.                                         reqInfo{11}: ReqInfoPtr;
  600.                                         tagList{8}: ARRAY OF u.TagItem): LONGINT;
  601. PROCEDURE PaletteRequest* {req, -102} (title{10}: ARRAY OF CHAR;
  602.                                        reqInfo{11}: ReqInfoPtr;
  603.                                        tag1{8}..: u.Tag): LONGINT;
  604. PROCEDURE ReqHandlerA* {req, -108} (hinfo{9}: HandlerInfoPtr;
  605.                                     sigs{0}: LONGSET;
  606.                                     tagList{8}: ARRAY OF u.TagItem): LONGINT;
  607. PROCEDURE ReqHandler* {req, -108} (hinfo{9}: HandlerInfoPtr;
  608.                                    sigs{0}: LONGSET;
  609.                                    tag1{8}..: u.Tag): LONGINT;
  610. PROCEDURE SetWaitPointer* {req, -114} (window{8}: I.WindowPtr);
  611. PROCEDURE GetVScreenSize* {req, -120} (screen{8}: I.ScreenPtr;
  612.                                        VAR width{9},height{10}: LONGINT);
  613. PROCEDURE SetReqPosition* {req, -126} (reqpos{0}: LONGINT;
  614.                                        VAR nw{8}: I.NewWindow;
  615.                                        screen{9}: I.ScreenPtr;
  616.                                        window{10}: I.WindowPtr);
  617. PROCEDURE Spread* {req, -132} (VAR posarray{8}: ARRAY OF LONGINT;
  618.                                sizearray{9}: ARRAY OF LONGINT;
  619.                                totalsize{0}, min{1}, max{2}, num{3}: LONGINT);
  620. PROCEDURE ScreenToFrontSafely* {req, -138} (screen{8}: I.ScreenPtr);
  621.  
  622. (*--- functions in V38 or higher (distributed as Release 2.0) ---*)
  623. PROCEDURE ScreenModeRequestA* {req, -144} (screenmodeReq{9}: ScreenModeRequesterPtr;
  624.                                            title{11}: ARRAY OF CHAR;
  625.                                            tagList{8}: ARRAY OF u.TagItem): BOOLEAN;
  626. PROCEDURE ScreenModeRequest* {req, -144} (screenmodeReq{9}: ScreenModeRequesterPtr;
  627.                                           title{11}: ARRAY OF CHAR;
  628.                                           tag1{8}..: u.Tag): BOOLEAN;
  629. PROCEDURE CloseWindowSafely* {req, -150} (window{8}: I.WindowPtr);
  630. PROCEDURE LockWindow* {req, -156} (window{8}: I.WindowPtr): LONGINT;
  631. PROCEDURE UnlockWindow* {req, -162} (window{8}: I.WindowPtr;
  632.                                      winlock{9}: LONGINT);
  633.  
  634. PROCEDURE Assert* (c: BOOLEAN; txt: ARRAY OF CHAR);
  635. BEGIN
  636.   IF NOT c THEN
  637.     vEZRequest (txt, "Abort", NIL, NIL);
  638.     HALT (20);
  639.   END;
  640. END Assert;
  641.  
  642. BEGIN
  643.   req := e.OpenLibrary (ReqToolsName, ReqToolsVersion);
  644.   IF req = NIL THEN
  645.     IF I.DisplayAlert (I.recoveryAlert,
  646.          "\x00\x64\x14missing reqtools.library V38\o\o", 50) THEN END;
  647.     HALT (20)
  648.   END; (* IF *)
  649. CLOSE
  650.   IF req # NIL THEN
  651.     e.CloseLibrary (req);
  652.     req := NIL;
  653.   END; (* IF *)
  654. END ReqTools.
  655.